Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

236
Visualizações
Visual Studio Intellisense shows "new expression can be simplified", but that fails the build

I have this code

MyClass instance = new MyClass();

VS Intellisense shows:

'new' expression can be simplified

and upon selecting that action, it changes the code to:

MyClass instance = new();

but then build fails with error code CS8181:

'new' cannot be used with tuple type. Use a tuple literal expression instead.

I am unable to understand this error message as MyClass is not related to tuple type. It's a plain class with int, string and list properties and no inheritance. Also, why should an Intellisense suggested action cause an error.

I've reported this issue to VS Dev Community. Link

Thanks in advance for your help.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

As documented here this available if you use C#9.0+. I guess that you use lower version of C# than required.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda